<Select ShowSearch
        Style="width: 200px"
        Placeholder="Select a person"
        OptionFilterProp="children"
        OnBlur="OnBlur"
        OnFocus="OnFocus"
        OnChange="OnChange"
        OnSearch="OnSearch"
        FilterOption="FilterOptionValue">
    <SelectOption Value="jack">Jack</SelectOption>
    <SelectOption Value="lucy">Lucy</SelectOption>
    <SelectOption Value="tom">Tom</SelectOption>
</Select>

@using OneOf;
@code
{
    private readonly Func<string, SelectOption, bool> FilterOptionValue = FilterOption;

    private void OnBlur()
    {
        Console.WriteLine("blur");
    }

    private void OnFocus()
    {
        Console.WriteLine("focus");
    }

    private void OnSearch(string value)
    {
        Console.WriteLine($"search: {value}");
    }

    private static bool FilterOption(string value, SelectOption option)
    {
        var optionContent = option.Children.ToUpperInvariant();
        return optionContent.Contains(value, StringComparison.OrdinalIgnoreCase);
    }

    private void OnChange(OneOf<string, IEnumerable<string>, LabeledValue, IEnumerable<LabeledValue>> value, OneOf<SelectOption, IEnumerable<SelectOption>> option)
    {
        Console.WriteLine($"selected: ${value}");
    }
}
